//
//  LTDataBase.h
//  聆听FM
//
//  Created by dllo on 16/6/18.
//  Copyright © 2016年 Dark. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "LTAlbumModel.h"
#import "ZCSListenListDetailModel.h"
#import "LTVoiceModel.h"
#import "LJLRadioPageModel.h"
#import "LTAnchorModel.h"

typedef NS_ENUM(NSUInteger, LTIsSaveDataInTable) {
    LTInTabel,//在表中
    LTNotInTable,//不在表中
    LTSelectError,//错误
};

typedef NS_ENUM(NSUInteger, LTDataType) {
    LTAlbum,//专辑
    LTVoice,//听单
    LTRadio,//广播
    LTAnchor,//主播
    LTSound,
};


@interface LTDataBase : NSObject

{
    //  指针
    sqlite3 *dbPoint;
}

/**
 *  创建一个单例工具来判断是否保存
 *
 *  @return 单例
 */
+ (LTDataBase *)shareLTDataBaseTool;

/**
 *  判断是否收藏教程
 *
 *  @param Model 的id
 *
 *  @return 是否在表中
 */
- (LTIsSaveDataInTable)isSaveDataInTableWithModel_id:(NSInteger)Model_id type:(LTDataType)type;

/**
 *  添加收藏
 *
 *  @param model   添加的Model(没有把所有的属性都添加)
 */
- (void)insertDataWithAlbumModel:(LTAlbumModel *)model;

- (void)insertDataWithVoiceModel:(ZCSListenListDetailModel *)model;

- (void)insertDataWithSoundModel:(LTVoiceModel *)model;

- (void)insertDataWithRadioModel:(LJLRadioPageModel *)model;

- (void)insertDataWithAnchorModel:(LTAnchorModel *)model;
/**
 *  取消收藏
 */
- (void)delegateDataWithModel_id:(NSInteger )Model_id type:(LTDataType)type;
//遍历所有取出

- (NSMutableArray *)selectAllWithtype:(LTDataType)type;


- (void)deleteAllCourseWith:(LTDataType)type;






@end
